home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / WWIV Mods / WWIVMOD.ZIP / JAFO04G.MOD < prev    next >
Encoding:
Text File  |  1994-01-06  |  19.4 KB  |  719 lines

  1. JAFO #1 @8861
  2. Fri Dec 10 08:44:19 1993
  3. 0R: net33: @4076 (via @4061) [04:27 12/13/93]
  4. 0R: net33: @4050 (via @4064) [03:51 12/13/93]
  5. 0R: net33: @4064 (via @1040) [02:08 12/13/93]
  6. 0R: net33: @1040 (via @2050) [15:27 12/12/93]
  7. 0R: net34: @2050 [13:23 12/12/93]
  8. 0R: net34: @2050 (via @1040) [07:01 12/12/93]
  9. 0R: net33: @1040 (via @1) [08:12 12/12/93]
  10. 0R: net34: @1 (via @8856) [03:39 12/12/93]
  11. 0R: net33: @8856 (via @8861) [01:36 12/11/93]
  12. 0R: net33: @8861 [08:52 12/10/93]
  13. ┌────────────────────────────────────────────────────────────────────────────┐
  14. │ Mod Name      : JAFO04G.MOD              Mod Author: JAFO 1@1     TerraNET │
  15. │ Difficulty    : █████▒▒▒▒▒                                1@8861  WWIVnet  │
  16. │ WWIV Version  : 4.23                                      1@8857  IceNET   │
  17. │ Mod Date      : 12/10/93                                  1@8857  SOLARnet │
  18. │ Files Affected: BBS.C, BBSUTL.C, COM.C, GFILES.C,         1@18857 WWIVLink │
  19. │                 SHRINK.C, UTILITY.C, FCNS.H, VARS.H                        │
  20. │ Description   : Enhanced Main Menu & Transfer Prompts                      │
  21. └────────────────────────────────────────────────────────────────────────────┘
  22.  
  23. ══[ Description ]═════════════════════════════════════════════════════════════
  24.  
  25. This mod will change the way your main menu and transfer prompts work.
  26. Normally, if you type '>', a few line spaces occur and the new prompt
  27. appears below.  Here is an example:
  28.  
  29. T - 50:33:21
  30. [1] [SysOp Announcements] :>
  31.  
  32.  
  33. T - 50:33:19
  34. [2] [General] :
  35.  
  36. As you can see, if you wanted to go to sub #30, it could take up 5 screens
  37. to get there!  This mod will keep the prompt on the SAME line while you
  38. advance or retreat subs, as well as directories, IF the user has ANSI
  39. enabled.  If you have modified your prompts to include random quotes or
  40. something, and have more than 2 lines, I'd suggest not using this mod,
  41. because additional code will be required, and it will be very slow at 2400
  42. baud.
  43.  
  44. Revision B Note:  If you are using the original version of this mod,
  45.                   JAFO04, then I suggest you completely rip it out of
  46.                   your source and install this mod.  This one is far
  47.                   easier to install too!
  48.  
  49. Revision C Note:  There was a very minor bug in 2.0.  I forgot to add
  50.                   a single line in BBS.C so that while at WFC everything
  51.                   acts normally.  If you installed V2.0, you probably
  52.                   noticed everything was kinda screwy at WFC.
  53.  
  54. Revision D Note:  This version of the mod now keeps the prompt on the same
  55.                   line when you press a valid sub/dir number.  This was a
  56.                   feature of the original mod, but was taken out of
  57.                   subsequent versions (not by design).  It has since been
  58.                   requested by many people, so it is in now.
  59.  
  60. Revision E Note:  Made a change suggested by Swamp Gas.  If a user is in non-
  61.                   expert mode, prior versions would still reprint a menu when
  62.                   they changed subs.  This version will keep the prompt on the
  63.                   same line.  I've also fixed a few other problems with how
  64.                   prompts were handled for non-expert users.
  65.  
  66. Revision F Note:  This version works with WWIV v4.23.  It is conference aware.
  67.  
  68. Revision G Note:  Added some minor changes to support the '{' and '}' keys for
  69.                   changing conferences.  If you are upgrading from JAFO04F,
  70.                   only do steps 4 and 8.
  71.  
  72. ══[ Legend ]══════════════════════════════════════════════════════════════════
  73.  
  74.   =  Existing line - Do not change
  75.   $  Existing line - Line has wrapped from previous line
  76.   +  Add this line
  77.   -  Remove this line
  78.  
  79. ══[ Step 1 ]══════════════════════════════════════════════════════════════════
  80.  
  81. Please back up your source code.  Even the best programmers make mistakes.
  82.  
  83. ══[ Step 2 ]══════════════════════════════════════════════════════════════════
  84.  
  85. In VARS.H, change the line shown.  You are adding the "newline" variable.
  86.  
  87. =               instance,debuglevel,multitasker,tagging,tagptr,cursormove,
  88. -               titled;
  89. +               titled, newline;
  90. =
  91. = __EXTRN__ unsigned short com_speed, *csn_index, crc, *gat, modem_flag,
  92. =                          modem_mode, modem_speed, net_sysnum, curloc;
  93.  
  94. ══[ Step 3 ]══════════════════════════════════════════════════════════════════
  95.  
  96. In BBS.C, add the the following line near the top.
  97.  
  98. = #define _DEFINE_GLOBALS_
  99. = #include "vars.h"
  100. = #include "subxtr.h"
  101. =
  102. =
  103. = #include <math.h>
  104. + #include <ctype.h>
  105. =
  106. =
  107. = unsigned _stklen=15360;
  108.  
  109. ══[ Step 4 ]══════════════════════════════════════════════════════════════════
  110.  
  111. Put the following function right before "int checkpw".
  112.  
  113. void prompt(char *s, char *s1, int useconf)
  114. {
  115.   if ((okansi()) && (!newline)) {
  116.     if (useconf)
  117.       outstr("\r\x1b[2A");
  118.     else
  119.       outstr("\r\x1b[1A");
  120.   } else
  121.     nl();
  122.   tleft(1);
  123. #ifdef OPT_EXTRA_COLOR
  124.   npr("1T 0- 1%s\r\n",ctim(nsl()));
  125. #else
  126.   npr("T - %s\r\n",ctim(nsl()));
  127. #endif
  128.   if (useconf) {
  129.     outstr(s);
  130.     if ((okansi()) && (!newline))
  131.       outstr("\x1b[K");
  132.     nl();
  133.   }
  134.   prt(2,s1);
  135.   if ((okansi()) && (!newline))
  136.     outstr("\x1b[K");
  137.   newline=0;
  138. }
  139.  
  140. ══[ Step 5 ]══════════════════════════════════════════════════════════════════
  141.  
  142. In "void mainmenu", make the changes shown.
  143.  
  144. = void mainmenu(void)
  145. = {
  146. =   char *s, s1[81], s2[81], ch;
  147. -   int i, useconf, ac;
  148. +   int i, i1, useconf, ac;
  149. =   long l;
  150. =
  151. =   s2[0]=0;
  152. =   if (usub[cursub].subnum==-1) {
  153. =     cursub=0;
  154. =     if (usub[cursub].subnum==-1) {
  155. =       strcpy(s2,get_string(16));
  156. =     }
  157. =   }
  158. =
  159. =   write_inst(INST_LOC_MAIN,usub[cursub].subnum,INST_FLAGS_ONLINE);
  160. =
  161. =   tleft(1);
  162. -   if ((sysstatus_expert & thisuser.sysstatus)==0)
  163. +   if ((newline) && ((sysstatus_expert & thisuser.sysstatus)==0))
  164. =     printmenu(0);
  165. =
  166. -   nl();
  167. -   nl();
  168. =   tleft(1);
  169. =
  170. =   useconf=((subconfnum>1) && okconf(&thisuser));
  171. =
  172. = #ifdef OPT_EXTRA_COLOR
  173. -   npr("1T 0- 1%s\r\n",ctim(nsl()));
  174. =   sprintf(s1,"7[1Conf %c7] [1%s7]",
  175. $           subconfs[uconfsub[curconfsub].confnum].designator,
  176. =     stripcolors(subconfs[uconfsub[curconfsub].confnum].name));
  177. =   if (s2[0]==0)
  178. =     sprintf(s2,"7[1%s%s7] [1%s7]0 : 2",
  179. =       useconf?get_string(1398):"",
  180. =       usub[cursub].keys,
  181. =       stripcolors(subboards[usub[cursub].subnum].name));
  182. = #else
  183. -   npr("T - %s\r\n",ctim(nsl()));
  184. =   sprintf(s1,"[Conf %c] [%s]",
  185. $           subconfs[uconfsub[curconfsub].confnum].designator,
  186. =     stripcolors(subconfs[uconfsub[curconfsub].confnum].name));
  187. =   if (s2[0]==0)
  188. =     sprintf(s2,"[%s%s] [%s] :",
  189. =       useconf?get_string(1398):"",
  190. =       usub[cursub].keys,
  191. =       stripcolors(subboards[usub[cursub].subnum].name));
  192. = #endif
  193. =
  194. +   prompt(s1,s2,useconf);
  195. +
  196. -   if (useconf) {
  197. -     ansic(2);
  198. -     pl(s1);
  199. -   }
  200. -   prt(2,s2);
  201. =   helpl=1;
  202. =   s=mmkey(0);
  203. =   helpl=0;
  204. -   if (s[0])
  205. -     for (i=0; (i<num_subs) && (usub[i].subnum!=-1); i++)
  206. -       if (strcmp(usub[i].keys,s)==0)
  207. +   if (s[0]) {
  208. +     i1=0;
  209. +     for (i=0; (i<num_subs) && (usub[i].subnum!=-1); i++) {
  210. +       if (strcmp(usub[i].keys,s)==0) {
  211. =         cursub=i;
  212. +         i1=1;
  213. +       }
  214. +     }
  215. +     if ((!i1) && (okansi()) && (isdigit(s[0]))) {
  216. +       nl();
  217. +       newline=1;
  218. +     }
  219. +   } else
  220. +     newline=1;
  221. =   if (strlen(s)>2) {
  222. =     sprintf(s1,"//%s",s);
  223. =     sysopchar(s1);
  224.  
  225. ══[ Step 6 ]══════════════════════════════════════════════════════════════════
  226.  
  227. In "void dlmainmenu", make the changes shown.
  228.  
  229. = void dlmainmenu(void)
  230. = {
  231. =   char *s, s1[81],s2[81],ch;
  232. =   int i,i1,i2,abort,next,useconf,ac;
  233. =   messagerec m;
  234. =
  235. =   s2[0]=0;
  236. =   if (udir[curdir].subnum==-1) {
  237. =     curdir=0;
  238. =     if (udir[curdir].subnum==-1) {
  239. =       strcpy(s2,get_string(32));
  240. =     }
  241. =   }
  242. =
  243. =   write_inst(INST_LOC_XFER,udir[curdir].subnum,INST_FLAGS_ONLINE);
  244. =
  245. =   tleft(1);
  246. -   if ((sysstatus_expert & thisuser.sysstatus)==0)
  247. +   if ((newline) && ((sysstatus_expert & thisuser.sysstatus)==0))
  248. =     printmenu(3);
  249. =
  250. -   nl();
  251. -   nl();
  252. =   tleft(1);
  253. =
  254. =   useconf=((dirconfnum>1) && okconf(&thisuser));
  255. =
  256. = #ifdef OPT_EXTRA_COLOR
  257. -   npr("1T 0- 1%s\r\n",ctim(nsl()));
  258. =   sprintf(s1,"7(1Conf %c7)0-7(1%s7)",
  259. $           dirconfs[uconfdir[curconfdir].confnum].designator,
  260. =     stripcolors(dirconfs[uconfdir[curconfdir].confnum].name));
  261. =   if (s2[0]==0)
  262. =     sprintf(s2,"7(1%s%s7)0-7(1%s7)0 : 2",
  263. =       useconf?get_string(1399):"",
  264. =       udir[curdir].keys,
  265. =       stripcolors(directories[udir[curdir].subnum].name));
  266. = #else
  267. -   npr("T - %s\r\n",ctim(nsl()));
  268. =   sprintf(s1,"(Conf %c)-(%s)",
  269. $           dirconfs[uconfdir[curconfdir].confnum].designator,
  270. =     stripcolors(dirconfs[uconfdir[curconfdir].confnum].name));
  271. =   if (s2[0]==0)
  272. =     sprintf(s2,"(%s%s)-(%s) :",
  273. =       useconf?get_string(1399):"",
  274. =       udir[curdir].keys,
  275. =       stripcolors(directories[udir[curdir].subnum].name));
  276. = #endif
  277. +
  278. +   prompt(s1,s2,useconf);
  279. +
  280. -   if (useconf) {
  281. -     ansic(2);
  282. -     pl(s1);
  283. -   }
  284. -   prt(2,s2);
  285. =   helpl=2;
  286. =   s=mmkey(1);
  287. =   helpl=0;
  288. -   if (s[0])
  289. -     for (i=0; i<num_dirs; i++)
  290. -       if (strcmp(udir[i].keys,s)==0)
  291. +   if (s[0]) {
  292. +     i1=0;
  293. +     for (i=0; i<num_dirs; i++) {
  294. +       if (strcmp(udir[i].keys,s)==0) {
  295. =         curdir=i;
  296. +         i1=1;
  297. +       }
  298. +     }
  299. +     if ((!i1) && (okansi()) && (isdigit(s[0]))) {
  300. +       nl();
  301. +       newline=1;
  302. +     }
  303. +   } else
  304. +     newline=1;
  305. =   if (strlen(s)>2) {
  306. =     sprintf(s1,"//%s",s);
  307. =     sysopchar(s1);
  308.  
  309. ══[ Step 7 ]══════════════════════════════════════════════════════════════════
  310.  
  311. In BBSUTL.C, add the following line near the top.
  312.  
  313. = #include "vars.h"
  314. + #include <ctype.h>
  315. =
  316. = #pragma hdrstop
  317.  
  318. ══[ Step 8 ]══════════════════════════════════════════════════════════════════
  319.  
  320. Replace the entire "char *mmkey" function with the one below.
  321.  
  322. char *mmkey(int dl)
  323. {
  324.   static unsigned char cmd1[10],cmd2[81],ch;
  325.   int i,i1,expert,p,cp,useconf;
  326.  
  327.   if ((sysstatus_expert & thisuser.sysstatus)==0)
  328.     expert=0;
  329.   else
  330.     expert=1;
  331.   do {
  332.     do {
  333.       ch=getkey();
  334.     } while ((((ch<' ') && (ch!=13)) || (ch>126)) && (hangup==0));
  335.     ch=upcase(ch);
  336.     outchr(ch);
  337.     if (ch==13)
  338.       cmd1[0]=0;
  339.     else
  340.       cmd1[0]=ch;
  341.     cmd1[1]=0;
  342.     p=0;
  343.     switch(dl) {
  344.  
  345.     case 1:
  346.       if (strchr(dtc,ch)!=NULL)
  347.         p=2;
  348.       else if (strchr(dcd,ch)!=NULL)
  349.         p=1;
  350.       break;
  351.     case 2:
  352.       if (strchr(odc,ch)!=NULL)
  353.         p=1;
  354.       break;
  355.     case 0:
  356.       if (strchr(tc,ch)!=NULL)
  357.         p=2;
  358.       else if (strchr(dc,ch)!=NULL)
  359.         p=1;
  360.       break;
  361.     }
  362.     if (p) {
  363.       cp=1;
  364.       do {
  365.         do {
  366.           ch=getkey();
  367.         } while ((((ch<' ') && (ch!=13) && (ch!=8)) ||(ch>126))&&(hangup==0));
  368.         ch=upcase(ch);
  369.         if (ch==13) {
  370.           if ((dl==2) || (!okansi()))
  371.             nl();
  372.           if ((!expert) && (!okansi()))
  373.             newline=1;
  374.           return(cmd1);
  375.         } else {
  376.           if (ch==8) {
  377.             backspace();
  378.             cmd1[--cp]=0;
  379.           } else {
  380.             cmd1[cp++]=ch;
  381.             cmd1[cp]=0;
  382.             outchr(ch);
  383.             if ((ch=='/') && (cmd1[0]=='/')) {
  384.               input(cmd2,50);
  385.               if (((curdloads!=0) && (curdloads!=1) && (dl!=2)) ||
  386.                    (!newline)) {
  387.                 if (isdigit(cmd2[0])) {
  388.                   if ((curdloads==0) && (dl==0)) {
  389.                     i1=0;
  390.                     for (i=0; (i<num_subs) && (usub[i].subnum!=-1); i++)
  391.                       if (strcmp(usub[i].keys,cmd2)==0)
  392.                         i1=1;
  393.                     if (i1)
  394.                       nl();
  395.                   }
  396.                   if ((curdloads==1) && (dl==1)) {
  397.                     i1=0;
  398.                     for (i=0; i<num_dirs; i++)
  399.                       if (strcmp(udir[i].keys,cmd2)==0)
  400.                         i1=1;
  401.                     if (i1)
  402.                       nl();
  403.                   }
  404.                   if (dl==2)
  405.                     nl();
  406.                 } else
  407.                   nl();
  408.                 newline=1;
  409.               }
  410.               return(cmd2);
  411.             } else if (cp==p+1) {
  412.               if (((curdloads!=0) && (curdloads!=1) && (dl!=2)) ||
  413.                    (!newline)) {
  414.                 if (isdigit(cmd1[0])) {
  415.                   if ((dl==2) || (!okansi()))
  416.                     nl();
  417.                   if ((!expert) && (!okansi()))
  418.                     newline=1;
  419.                 } else {
  420.                   nl();
  421.                   newline=1;
  422.                 }
  423.               } else {
  424.                 nl();
  425.                 newline=1;
  426.               }
  427.               return(cmd1);
  428.             }
  429.           }
  430.         }
  431.       } while (cp);
  432.     } else {
  433.       if (((curdloads!=0) && (curdloads!=1) && (dl!=2)) ||
  434.            (!newline)) {
  435.         switch (cmd1[0]) {
  436.           case '>':
  437.           case '+':
  438.           case ']':
  439.           case '}':
  440.           case '<':
  441.           case '-':
  442.           case '[':
  443.           case '{':
  444.           case 'H':
  445.             if ((dl==2) || (!okansi()))
  446.               nl();
  447.             if ((!expert) && (!okansi()))
  448.               newline=1;
  449.             break;
  450.           default:
  451.             if (isdigit(cmd1[0])) {
  452.               if ((dl==2) || (!okansi()))
  453.                 nl();
  454.               if ((!expert) && (!okansi()))
  455.                 newline=1;
  456.             } else {
  457.               nl();
  458.               newline=1;
  459.             }
  460.             break;
  461.         }
  462.       } else {
  463.         nl();
  464.         newline=1;
  465.       }
  466.       return(cmd1);
  467.     }
  468.   } while (hangup==0);
  469.   cmd1[0]=0;
  470.   return(cmd1);
  471. }
  472.  
  473. ══[ Step 9 ]══════════════════════════════════════════════════════════════════
  474.  
  475. In COM.C, change the following line in "void input1".
  476.  
  477. =           case 13:
  478. =             s[curpos] = 0;
  479. =           done = echo = 1;
  480. -             if (crend)
  481. +             if ((newline) && (crend))
  482. =               nl();
  483. =             break;
  484.  
  485. ══[ Step 10 ]═════════════════════════════════════════════════════════════════
  486.  
  487. After "static void print_yn", add the following function.
  488.  
  489. static void print_yn2(int i)
  490. {
  491.   if (num_strings(i))
  492.     outstr(getrandomstring(i));
  493.   else switch(i) {
  494.     case 2: outstr(str_yes); break;
  495.     case 3: outstr(str_no); break;
  496.   }
  497. }
  498.  
  499. ══[ Step 11 ]═════════════════════════════════════════════════════════════════
  500.  
  501. After "char ynq", add the following function.
  502.  
  503. char ynq2(void)
  504. {
  505.   char ch=0;
  506.   ansic(1);
  507.   while ((!hangup) &&
  508.          ((ch = upcase(getkey())) != *str_yes) &&
  509.          (ch != *str_no) &&
  510.          (ch != *str_quit) &&
  511.          (ch != 13))
  512.     ;
  513.   if (ch==*str_yes) {
  514.     ch='Y';
  515.     print_yn2(2);
  516.   } else if (ch==*str_quit) {
  517.     ch='Q';
  518.     outstr(str_quit);
  519.   } else {
  520.     ch='N';
  521.     print_yn2(3);
  522.   }
  523.   return(ch);
  524. }
  525.  
  526. ══[ Step 12 ]═════════════════════════════════════════════════════════════════
  527.  
  528. In GFILES.C, replace the following two functions.
  529.  
  530. void hop_sub(void)
  531. {
  532.   unsigned char s1[81], s2[81], ch;
  533.   int c,i,i2,nc,abort=0,oc,os;
  534.  
  535.   nc=0;
  536.   while (uconfsub[nc].confnum!=-1)
  537.     nc++;
  538.  
  539.   if (okansi())
  540.     outstr("\r\x1b[K");
  541.   else
  542.     nl();
  543.   prt(2,get_string(1161));
  544.   if (okansi())
  545.     newline=0;
  546.   input(s1,40);
  547.   if (!s1[0])
  548.     return;
  549.   if (!okansi())
  550.     nl();
  551.  
  552.   c=0; oc=curconfsub; os=usub[cursub].subnum;
  553.  
  554.   while ((c<nc) && (!abort)) {
  555.     if (okconf(&thisuser))
  556.       setuconf(CONF_SUBS,c,-1);
  557.     i=0;
  558.     while ((i<num_subs) && (usub[i].subnum!=-1) && (!abort)) {
  559.       strcpy(s2,subboards[usub[i].subnum].name);
  560.       for (i2=0;(s2[i2]=upcase(s2[i2]))!=0;i2++)
  561.         ;
  562.       if (strstr(s2,s1)!=NULL) {
  563.         if (okansi())
  564.           outstr("\r\x1b[K");
  565.         if (!okansi())
  566.           nl();
  567.         ansic(5);
  568.         npr("%s\"%s\"",get_string(1162),subboards[usub[i].subnum].name);
  569.         npr(get_string(1378));
  570.         ch=ynq2();
  571.         if (ch=='Y') {
  572.           abort=1;
  573.           cursub=i;
  574.           break;
  575.         } else if (ch=='Q') {
  576.           abort=1;
  577.           if (okconf(&thisuser))
  578.             setuconf(CONF_SUBS, oc, os);
  579.           break;
  580.         }
  581.       }
  582.       ++i;
  583.     }
  584.     c++;
  585.     if (!okconf(&thisuser))
  586.       break;
  587.   }
  588.   if ((okconf(&thisuser)) && (!abort))
  589.     setuconf(CONF_SUBS, oc, os);
  590. }
  591.  
  592.  
  593. void hop_dir(void)
  594. {
  595.   unsigned char s1[81],s2[81],ch;
  596.   int c,i,i2,nc,abort=0,oc,os;
  597.  
  598.   nc=0;
  599.   while (uconfdir[nc].confnum!=-1)
  600.     nc++;
  601.  
  602.   if (okansi())
  603.     outstr("\r\x1b[K");
  604.   else
  605.     nl();
  606.   prt(2,get_string(1163));
  607.   if (okansi())
  608.     newline=0;
  609.   input(s1,40);
  610.   if (!s1[0])
  611.     return;
  612.   if (!okansi())
  613.     nl();
  614.  
  615.   c=0; oc=curconfdir; os=udir[curdir].subnum;
  616.  
  617.   while ((c<nc) && (!abort)) {
  618.     if (okconf(&thisuser))
  619.       setuconf(CONF_DIRS,c,-1);
  620.     i=0;
  621.     while ((i<num_dirs) && (udir[i].subnum!=-1) && (!abort)) {
  622.       strcpy(s2,directories[udir[i].subnum].name);
  623.       for (i2=0;(s2[i2]=upcase(s2[i2]))!=0;i2++)
  624.         ;
  625.       if (strstr(s2,s1)!=NULL) {
  626.         if (okansi())
  627.           outstr("\r\x1b[K");
  628.         if (!okansi())
  629.           nl();
  630.         ansic(5);
  631.         npr("%s\"%s\"",get_string(1162),directories[udir[i].subnum].name);
  632.         npr(get_string(1378));
  633.         ch=ynq2();
  634.         if (ch=='Y') {
  635.           abort=1;
  636.           curdir=i;
  637.           break;
  638.         } else if (ch=='Q') {
  639.           abort=1;
  640.           if (okconf(&thisuser))
  641.             setuconf(CONF_DIRS, oc, os);
  642.           break;
  643.         }
  644.       }
  645.       ++i;
  646.     }
  647.     c++;
  648.     if (!okconf(&thisuser))
  649.       break;
  650.   }
  651.   if ((okconf(&thisuser)) && (!abort))
  652.     setuconf(CONF_DIRS, oc, os);
  653. }
  654.  
  655. ══[ Step 13 ]═════════════════════════════════════════════════════════════════
  656.  
  657. In SHRINK.C, add the following line to "int restore_data".
  658.  
  659. =     READ(numbatch);
  660. =     READ(numbatchdl);
  661. +     READ(newline);
  662. =
  663. =     sh_read(f,batch, numbatch*sizeof(batchrec));
  664.  
  665. ══[ Step 14 ]═════════════════════════════════════════════════════════════════
  666.  
  667. Add the following line in "void save_state".
  668.  
  669. =   WRITE(numbatch);
  670. =   WRITE(numbatchdl);
  671. +   WRITE(newline);
  672. =
  673. =   sh_write(f,batch, numbatch*sizeof(batchrec));
  674.  
  675. ══[ Step 15 ]═════════════════════════════════════════════════════════════════
  676.  
  677. In UTILITY.C, add the following line to "void frequent_init".
  678.  
  679. = void frequent_init(void)
  680. = /* This should be called after a user is logged off, and will initialize
  681. =  * screen-access variables.
  682. =  */
  683. = {
  684. =   setiia(90);
  685. =   g_flags=0;
  686. =   in_fsed=0;
  687. =   tagging=0;
  688. +   newline=1;
  689. =   curlsub=-1;
  690. =   curldir=-1;
  691.  
  692. ══[ Step 16 ]═════════════════════════════════════════════════════════════════
  693.  
  694. In FCNS.H, add the following lines.
  695.  
  696. = int yn(void);
  697. = int ny(void);
  698. = char ynq(void);
  699. + char ynq2(void);
  700. = void ansic(int n);
  701. = void ansic_x(int n);
  702.  
  703. ══[ Step 17 ]═════════════════════════════════════════════════════════════════
  704.  
  705. Compile your source.  Since we added a variable to VARS.H, a full re-compile
  706. is necessary.
  707.  
  708. ══[ Disclaimer ]══════════════════════════════════════════════════════════════
  709.  
  710. Don't complain to me if your board gets fried, your hard disk goes nuts, or
  711. something terrible happens.  The code in this mod should be harmless, but I
  712. can't guarantee it will work for you.  It works on my board.
  713.  
  714. JAFO 1@1     TerraNET
  715.      1@8861  WWIVnet
  716.      1@8857  IceNET
  717.      1@8857  SOLARnet
  718.      1@18857 WWIVLink
  719.